package com.tsing.basic.vo.req;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author TheTsing
 * @create 2021-03-29 23:30
 */
@Data
public class UserUpdateReqVo {

    @NotBlank(message = "id不能为空")
    private String id;

    @NotBlank(message = "昵称不能为空")
    private String nickName;

    @ApiModelProperty("1表示男，2表示女")
    @NotBlank(message = "性别不能为空")
    @Pattern(regexp = "^[1|2]{1}$", message = "性别只能传入1或者2，1表示男，2表示女")
    private String sex;

    private String phone;

    @Pattern(regexp = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$", message = "邮箱格式不合法")
    private String email;

    @DecimalMin(value = "500", message = "请传入正确的时间戳(毫秒)")
    @DecimalMax(value = "2147454847000", message = "请传入正确的时间戳(毫秒)")
    private Long birthday;

    private String photo;

    private String houseId;

    private String carportId;

}
